#include "httpclient.h"
#include <iostream>
#include <fstream>  
#include <stdio.h>

int main(int argc, char *argv[])
{
	CHttpClient httpClient;
	std::string url("https://www.baidu.com/");
	url = "http://124.232.147.14:8033/WebServiceTSPort.asmx/SelectQCMThreeStatistics";
	std::string postString = "dateTime=2016-12-19";
	std::string res;

	if (argc >= 2)
	{
		url = argv[1];
	}
	if (httpClient.post(url, postString, res) == 0)
	{
		std::cout << res.length() << std::endl;
		std::ofstream fout("e:/temp/aaa.txt");
		fout << res;
		fout.close();
		//std::cout << res << std::endl;
		//std::cout << res.length() << std::endl;
	}
	return 0;
}